package com.qsmx.store.app.main.display;

import android.app.Presentation;
import android.content.Context;
import android.os.Bundle;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.view.Display;

import com.qsmx.store.app.R;
import com.qsmx.store.app.main.display.adapter.GiftPayAdapter;
import com.qsmx.store.app.main.display.adapter.GoodsPayAdapter;

public class GiftPayDisplay extends Presentation {

    private RecyclerView rlvGiftList;
    private GiftPayAdapter mPayAdapter;
    private Context mContext;

    public GiftPayDisplay(Context outerContext, Display display) {
        super(outerContext, display);
        this.mContext = outerContext;
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.display_gift_pay);

        initView();
    }

    private void initView() {

        mPayAdapter = new GiftPayAdapter(mContext);
        rlvGiftList = findViewById(R.id.rlv_goods_list);
        LinearLayoutManager manager = new LinearLayoutManager(getContext());
        rlvGiftList.setLayoutManager(manager);
        rlvGiftList.setAdapter(mPayAdapter);

    }
}
